@extends('admin.master')
<script src="/js/admin/afterServices.js"></script>
@section('title', '售后服务')
	
@section('firstItem')
    <span class="firstItem">售后服务</span>
    <input class="a_indexbg" type="hidden" value="afterservice" />
@stop
				
@section('searchList')
@parent
	<a class="afterQueryBtn">搜索</a>
	<div>
		<input class="deviceCodeInput" type="text" placeholder="输入用户名或设备编号" value="{{ $condition }}" />

	</div>
@stop
				
@section('dataTables')
@parent
	<table class="afterService dataTables" cellspacing="0" cellpadding="0">
		<thead>
			<tr>
				<td>序号</td>
				<td>水机用户</td>
				<td>手机号码</td>
				<td>安装地址</td>
				<td>设备编号</td>
				<td>用户名</td>
				<td>水机故障原因</td>
				<td>备注信息</td>
				<td>上门服务</td>
				<td>消息时间</td>
				<td>设备详情</td>
				<td>是否已处理</td>
			</tr>
		</thead>
		<tbody>
			@for($i=0, $afterServiceCount=count($after_services); $i<$afterServiceCount; $i++)
			<tr >
				<td>{{ $i+1 }}</td>
				<td>{{ $after_services[$i]->name }}</td>
				<td>{{ $after_services[$i]->phone }}</td>
				<td>{{ $after_services[$i]->installation_address }}</td>
				<td class="devicecodeVal">{{ $after_services[$i]->device->code }}</td>
				<td>{{ $after_services[$i]->device->installInfo->customer_name or '' }}</td>
				<td>{{ $after_services[$i]->equipment_failure }}</td>
				<td class="add_text" style="width:200px;">{{ $after_services[$i]->failure_description }}</td>
				<td>{{ $after_services[$i]->door_to_door_service == '0'? '否' : '是' }}</td>
				<td>{{ $after_services[$i]->created_at }}</td>
				<td><a href="/admin/device/history?device_id={{ $after_services[$i]->device_id }}">查看</a></td>
				<td><input type="hidden" value="{{ $after_services[$i]->id }}" />
				@if($after_services[$i]->status)
				<span class="checkedBox checkedBoxBg"></span>
				@else
				<span class="checkedBox"></span>
				@endif
				</td>
			</tr>
			@endfor			
		</tbody>
	</table>
@stop
@section('page_num')
<ul class="pagination pagination-lg"> 
	{!! $after_services->render() !!}
</ul>

@stop

@section('infor_promit')
<!-- 确认提醒框 -->
<div class="checkHintBoxBg">
	<div class="checkHintBox">
		<p class="titleTxt">用户请求</p>
		<div>是否已处理用户的发送请求？</div>
		<label class="labelBox afterserviceLabelBox"></label>
		<div>
			<a class="yesBtn">是</a>
			<a class="noBtn">否</a>
		</div>
	</div>
</div>
<!-- 确认提醒框 end-->
@parent
@stop
